package com.niiwoo.civet.account.dto.request;

import com.niiwoo.civet.account.enums.OrderTypeEnum;
import com.niiwoo.civet.base.dto.BaseFeeDetailDTO;
import com.niiwoo.civet.base.enums.BorrowProjectTypeEnum;
import com.niiwoo.civet.base.enums.OrderRefundTypeEnum;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 交易冻结请求对象
 * 目前适用于：还款/垫付
 * Created by wangjichao on 2018/4/19.
 */
@Getter
@Setter
public class TransFreezeRequestDTO implements Serializable {

    private static final long serialVersionUID = 2477796441345491571L;
    /**
     * 交易中心订单ID
     */
    @NotNull
    private Long orderId;

    /**
     * 订单类型
     */
    @NotNull
    private OrderTypeEnum orderType;


    /**
     * 还款类型:还款需传递，垫付无需传递
     *
     */
    private OrderRefundTypeEnum orderRefundTypeEnum;

    /**
     * 项目ID
     */
    @NotNull
    private Long projectId;

    /**
     * 项目类型
     */
    @NotNull
    private BorrowProjectTypeEnum borrowProjectTypeEnum;

    /**
     * 项目ID
     */
    @NotBlank
    private String projectTitle;

    /**
     * 当前期数 天标无需传递
     */
    private Integer currentPeriod;

    /**
     * 总期数 天标无需传递
     */
    private Integer totalPeriods;

    /**
     * 还款账户ID
     */
    @NotNull
    private Long repaymentAccountId;

    /**
     * 冻结金额
     */
    @NotNull
    private BigDecimal amount;

    /**
     * 费用明细
     */
    @NotEmpty
    List<BaseFeeDetailDTO> feeDetailDTOList;

    /**
     * 失效时间
     */
    @NotNull
    private Date expireTime;

    /**
     * 还款订单生成时间
     */
    @NotNull
    private Date refundOrderCreateTime;


}
